LEGION Simulator API Readme

Shutting Down Bentley Licence Instances

When an ISimulator instance is destroyed, the API's licensing components should automatically shut down its licence instances.

It is important to be sure the licence instance is shut down, to avoid reporting erroneous excess use.

Licence Support provides a dedicated shutdown function, you can call it to guarantee a licence instance is shut down:
// NOTE: destroying the simulator instance will shut down the licence client.
// If the simulator instance is NOT destroyed, the licence client may remain active which
// could result in excess usage reported to Bentley.
// To avoid this in the event of unhandled exceptions, API Clients should wrap calls in a try-catch which
// explicitly calls Legion::LicenceSupport::CLegnLicenceSupport::ShutDownLicenceClient().

// But it's a good idea to make sure... this won't do anything if the licence client is already shutdown...
Legion::LicenceSupport::CLegnLicenceSupport::ShutDownLicenceClient();